class UserstatusesController < ApplicationController
  # GET /userstatuses
  # GET /userstatuses.xml
  def index
    @userstatuses = Userstatuse.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @userstatuses }
    end
  end

  # GET /userstatuses/1
  # GET /userstatuses/1.xml
  def show
    @userstatuse = Userstatuse.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @userstatuse }
    end
  end

  # GET /userstatuses/new
  # GET /userstatuses/new.xml
  def new
    @userstatuse = Userstatuse.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @userstatuse }
    end
  end

  # GET /userstatuses/1/edit
  def edit
    @userstatuse = Userstatuse.find(params[:id])
  end

  # POST /userstatuses
  # POST /userstatuses.xml
  def create
    @userstatuse = Userstatuse.new(params[:userstatuse])

    respond_to do |format|
      if @userstatuse.save
        flash[:notice] = 'Userstatuse was successfully created.'
        format.html { redirect_to(@userstatuse) }
        format.xml  { render :xml => @userstatuse, :status => :created, :location => @userstatuse }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @userstatuse.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /userstatuses/1
  # PUT /userstatuses/1.xml
  def update
    @userstatuse = Userstatuse.find(params[:id])

    respond_to do |format|
      if @userstatuse.update_attributes(params[:userstatuse])
        flash[:notice] = 'Userstatuse was successfully updated.'
        format.html { redirect_to(@userstatuse) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @userstatuse.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /userstatuses/1
  # DELETE /userstatuses/1.xml
  def destroy
    @userstatuse = Userstatuse.find(params[:id])
    @userstatuse.destroy

    respond_to do |format|
      format.html { redirect_to(userstatuses_url) }
      format.xml  { head :ok }
    end
  end
end
